const mysql = require('mysql2/promise')
const settings = require('../../config/settings')

const config = {
    host: settings.db.host,
    user: settings.db.user,
    password: settings.db.password,
    database: settings.db.db_name,
    waitForConnections: true,
    connectionLimit: 10,
    queueLimit: 0
}

const connection = mysql.createPool(config)

module.exports = connection


